package cn.piaoyi.service.scheduling;

import org.apache.commons.logging.*;
import org.quartz.*;
import org.springframework.scheduling.quartz.*;

import cn.piaoyi.service.CartService;


public class ClearCartJob extends QuartzJobBean {

  private static final Log logger = LogFactory.getLog(ClearCartJob.class);
  
  private CartService cartService;


  public CartService getCartService() {
	return cartService;
  }
	
  public void setCartService(CartService cartService) {
	this.cartService = cartService;
  }

  public ClearCartJob() {
  }

  /**
   * executeInternal
   *
   * @param jobExecutionContext JobExecutionContext
   * @throws JobExecutionException
   * @todo Implement this org.springframework.scheduling.quartz.QuartzJobBean method
   */
  protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
    logger.info("Clear Cart Start");
    this.getCartService().removeCartAll();
    logger.info("Clear Cart End");
  }
}
